//
//  UILabel+Automatically.m
//  高仿暴走斗图
//
//  Created by key on 16/6/2.
//  Copyright © 2016年 huangsongyao. All rights reserved.
//

#import "UILabel+Automatically.h"
#import "UILabel+SuggestSize.h"

@implementation UILabel (Automatically)

- (instancetype)initWithAutomaticallyZoomLabelForText:(NSString *)text font:(UIFont *)font width:(CGFloat)width {
    
    if (self = [super init]) {
        
        self.numberOfLines = 0;
        self.lineBreakMode = NSLineBreakByCharWrapping;
        self.text = text;
        self.font = font;
        CGSize size = [self suggestedSizeForWidth:width];
        
        self.viewSize = size;
    }
    return self;
}

@end
